<?php
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller {
    public function login_verify(){
        // CONTROLLER_NAME;
        if(!isset($_COOKIE['userid'])){
            $this->redirect('Login/index');
        }else{
            $user=M('users');
            $userinfo=$user->where("id=".$_COOKIE['userid'])->select();
            $this->assign("userinfo",$userinfo[0]);
            // 输出当前控制器名（判断当前是哪个页面）
            $this->assign("current_controller",CONTROLLER_NAME);
        }
    }

    
}